<template>
	<!-- #ifdef APP -->
	<scroll-view class="container" style="flex: 1">
	<!-- #endif -->
	<!-- #ifdef WEB -->
	<view class="web-container">
	<!-- #endif -->
		<!-- 蓝牙连接模块 -->
		<view class="card bluetooth-card">
			<view class="card-header">
				<text class="card-icon">📶</text>
				<text class="card-title">蓝牙连接</text>
				<view class="bluetooth-status" :class="bluetoothStatusClass">
					<view class="status-dot"></view>
					<text class="status-text">{{bluetoothStatusText}}</text>
				</view>
			</view>
			
			<!-- 蓝牙控制按钮 -->
			<view class="bluetooth-controls">
				<button class="bt-button" @click="initBluetooth" :disabled="bluetoothState.isInitialized">
					{{bluetoothState.isInitialized ? '已初始化' : '初始化蓝牙'}}
				</button>
				<button class="bt-button" @click="scanDevices" :disabled="!bluetoothState.isInitialized || bluetoothState.isScanning">
					{{bluetoothState.isScanning ? '扫描中...' : '扫描设备'}}
				</button>
				<button class="bt-button danger" @click="disconnectDevice" :disabled="!bluetoothState.isConnected">
					断开连接
				</button>
			</view>
			
			<!-- 设备列表 -->
			<view class="device-list" v-if="bluetoothState.devices.length > 0">
				<text class="section-title">发现的设备</text>
				<view 
					class="device-item" 
					v-for="(device, index) in bluetoothState.devices" 
					:key="device.deviceId"
					@click="connectDevice(device)"
				>
					<view class="device-info">
						<text class="device-name">{{device.name || '未知设备'}}</text>
						<text class="device-id">{{device.deviceId}}</text>
						<text class="device-rssi">信号强度: {{device.RSSI}}dBm</text>
					</view>
					<view class="connect-btn" v-if="!bluetoothState.isConnected">连接</view>
					<view class="connected-btn" v-if="bluetoothState.isConnected && bluetoothState.currentDevice?.deviceId === device.deviceId">已连接</view>
				</view>
			</view>
			
			<!-- 连接状态详情 -->
			<view class="connection-details" v-if="bluetoothState.isConnected && bluetoothState.currentDevice">
				<text class="section-title">连接详情</text>
				<view class="detail-row">
					<text class="detail-label">设备名称:</text>
					<text class="detail-value">{{bluetoothState.currentDevice.name || '未知设备'}}</text>
				</view>
				<view class="detail-row">
					<text class="detail-label">设备ID:</text>
					<text class="detail-value">{{bluetoothState.currentDevice.deviceId}}</text>
				</view>
				<view class="detail-row">
					<text class="detail-label">服务UUID:</text>
					<text class="detail-value">{{bluetoothState.serviceId || '未获取'}}</text>
				</view>
				<view class="detail-row">
					<text class="detail-label">特征值UUID:</text>
					<text class="detail-value">{{bluetoothState.characteristicId || '未获取'}}</text>
				</view>
			</view>
			
			<!-- 数据传输区 -->
			<view class="data-section" v-if="bluetoothState.isConnected">
				<text class="section-title">数据传输</text>
				<view class="data-controls">
					<input 
						class="data-input" 
						v-model="sendData" 
						placeholder="输入要发送的数据(十六进制)"
						maxlength="40"
					/>
					<button class="send-button" @click="writeData">发送</button>
				</view>
				<view class="received-data">
					<text class="data-label">接收到的数据:</text>
					<scroll-view class="data-display" scroll-y>
						<view class="data-item" v-for="(item, index) in receivedData" :key="index">
							<text class="data-time">{{item.time}}</text>
							<text class="data-content">{{item.data}}</text>
						</view>
					</scroll-view>
				</view>
			</view>
		</view>

		<!-- 状态栏 -->
		<view class="status-bar">
			<view class="status-indicator online">
				<view class="status-dot"></view>
				<text class="status-text">{{bluetoothState.isConnected ? '蓝牙已连接' : '设备离线'}}</text>
			</view>
			<text class="connection-info">连接时长: {{connectionTime}}</text>
		</view>

		<!-- 实时心电图卡片 -->
		<view class="card ecg-card">
			<view class="card-header">
				<text class="card-icon">📈</text>
				<text class="card-title">实时心电图</text>
				<view class="recording-indicator">
					<view class="recording-dot"></view>
					<text class="recording-text">录制中</text>
				</view>
			</view>
			
			<view class="ecg-display">
				<!-- 心电图波形区域 -->
				<view class="ecg-waveform">
					<view class="waveform-grid">
						<view class="grid-line" v-for="i in 6" :key="i"></view>
					</view>
					<view class="waveform-line">
						<!-- 模拟实时波形数据点 -->
						<view 
							class="wave-point" 
							v-for="(point, index) in waveformData" 
							:key="index"
							:style="{left: point.x + '%', bottom: point.y + '%'}"
						></view>
					</view>
				</view>
				
				<!-- 心率数值显示 -->
				<view class="heart-rate-display">
					<text class="heart-rate-value">{{currentHeartRate}}</text>
					<text class="heart-rate-unit">BPM</text>
				</view>
			</view>
		</view>

		<!-- 实时数据指标 -->
		<view class="metrics-grid">
			<view class="metric-card">
				<text class="metric-icon">💗</text>
				<text class="metric-label">心率</text>
				<text class="metric-value">{{heartRate}}</text>
				<text class="metric-unit">次/分</text>
			</view>
			
			<view class="metric-card">
				<text class="metric-icon">🩸</text>
				<text class="metric-label">血氧</text>
				<text class="metric-value">{{oxygenLevel}}</text>
				<text class="metric-unit">%</text>
			</view>
			
			<view class="metric-card">
				<text class="metric-icon">🫁</text>
				<text class="metric-label">呼吸</text>
				<text class="metric-value">{{breathingRate}}</text>
				<text class="metric-unit">次/分</text>
			</view>
			
			<view class="metric-card">
				<text class="metric-icon">🌡️</text>
				<text class="metric-label">体温</text>
				<text class="metric-value">{{bodyTemp}}</text>
				<text class="metric-unit">°C</text>
			</view>
		</view>

		<!-- 监测控制 -->
		<view class="control-panel">
			<view class="control-button primary" @click="toggleMonitoring">
				<text class="button-text">{{isMonitoring ? '停止监测' : '开始监测'}}</text>
			</view>
			<view class="control-button secondary" @click="exportData">
				<text class="button-text">导出数据</text>
			</view>
		</view>

		<!-- 历史记录快捷入口 -->
		<view class="quick-actions">
			<text class="section-title">快捷操作</text>
			<view class="action-list">
				<view class="action-item" @click="viewHistory">
					<text class="action-icon">📊</text>
					<text class="action-text">查看历史</text>
					<text class="action-arrow">></text>
				</view>
				<view class="action-item" @click="setAlert">
					<text class="action-icon">🚨</text>
					<text class="action-text">设置提醒</text>
					<text class="action-arrow">></text>
				</view>
				<view class="action-item" @click="deviceSettings">
					<text class="action-icon">⚙️</text>
					<text class="action-text">设备设置</text>
					<text class="action-arrow">></text>
				</view>
			</view>
		</view>

	<!-- #ifdef APP -->
	</scroll-view>
	<!-- #endif -->
	<!-- #ifdef WEB -->
	</view>
	<!-- #endif -->
</template>

<script>
	// 导入蓝牙API模块
	import bluetoothAPI from '@/sheep/api/bluetooth/bluetooth.js'
	
	export default {
		data() {
			return {
				// 连接状态
				connectionTime: "02:15:34",
				isMonitoring: true,
				
				// 实时数据
				currentHeartRate: 78,
				heartRate: 78,
				oxygenLevel: 98,
				breathingRate: 16,
				bodyTemp: 36.5,
				
				// 波形数据
				waveformData: [],
				
				// 蓝牙相关数据
				bluetoothState: {
					isInitialized: false,
					isScanning: false,
					isConnected: false,
					currentDevice: null,
					serviceId: '',
					characteristicId: '',
					devices: []
				},
				
				// 数据传输
				sendData: '',
				receivedData: []
			}
		},
		
		computed: {
			// 蓝牙状态显示类
			bluetoothStatusClass() {
				if (this.bluetoothState.isConnected) {
					return 'connected'
				} else if (this.bluetoothState.isScanning) {
					return 'scanning'
				} else if (this.bluetoothState.isInitialized) {
					return 'initialized'
				}
				return 'disconnected'
			},
			
			// 蓝牙状态文本
			bluetoothStatusText() {
				if (this.bluetoothState.isConnected) {
					return '已连接'
				} else if (this.bluetoothState.isScanning) {
					return '扫描中'
				} else if (this.bluetoothState.isInitialized) {
					return '已初始化'
				}
				return '未连接'
			}
		},
		onLoad() {
			this.initWaveformData()
			this.startRealTimeUpdate()
			this.setupBluetoothCallbacks()
		},
		onUnload() {
			this.stopRealTimeUpdate()
			// 清理蓝牙资源
			bluetoothAPI.cleanup()
		},
		methods: {
			// 初始化波形数据
			initWaveformData() {
				const data = []
				for (let i = 0; i < 50; i++) {
					data.push({
						x: i * 2,
						y: 30 + Math.sin(i * 0.5) * 20 + Math.random() * 10
					})
				}
				this.waveformData = data
			},
			
			// 开始实时更新
			startRealTimeUpdate() {
				// 模拟实时数据更新
				this.updateTimer = setInterval(() => {
					this.updateWaveformData()
					this.updateVitalSigns()
				}, 500)
			},
			
			// 停止实时更新
			stopRealTimeUpdate() {
				if (this.updateTimer) {
					clearInterval(this.updateTimer)
				}
			},
			
			// 更新波形数据
			updateWaveformData() {
				const newData = [...this.waveformData]
				newData.shift() // 移除第一个点
				newData.push({
					x: 98,
					y: 30 + Math.sin(Date.now() * 0.001) * 20 + Math.random() * 10
				})
				// 重新计算x坐标
				for (let i = 0; i < newData.length; i++) {
					newData[i].x = i * 2
				}
				this.waveformData = newData
			},
			
			// 更新生命体征
			updateVitalSigns() {
				// 模拟轻微的数据波动
				this.heartRate = 75 + Math.floor(Math.random() * 10)
				this.currentHeartRate = this.heartRate
				this.oxygenLevel = 97 + Math.floor(Math.random() * 3)
				this.breathingRate = 14 + Math.floor(Math.random() * 5)
			},
			
			// 切换监测状态
			toggleMonitoring() {
				this.isMonitoring = !this.isMonitoring
				uni.showToast({
					title: this.isMonitoring ? "开始监测" : "停止监测",
					icon: "success"
				})
			},
			
			// 导出数据
			exportData() {
				uni.showToast({
					title: "数据导出功能开发中",
					icon: "none"
				})
			},
			
			// 查看历史
			viewHistory() {
				uni.navigateTo({
					url: "/pages/report/report"
				})
			},
			
			// 设置提醒
			setAlert() {
				uni.showToast({
					title: "提醒设置功能开发中",
					icon: "none"
				})
			},
			
			// 设备设置
			deviceSettings() {
				uni.showToast({
					title: "设备设置功能开发中", 
					icon: "none"
				})
			},
			
			// ===== 蓝牙相关方法 =====
			
			/**
			 * 设置蓝牙API回调函数
			 */
			setupBluetoothCallbacks() {
				bluetoothAPI.setCallbacks({
					// 发现设备回调
					onDeviceFound: (devices) => {
						this.bluetoothState.devices = devices
					},
					
					// 连接状态变化回调
					onConnectionChange: (event) => {
						console.log('连接状态变化:', event)
						
						// 更新状态
						this.updateBluetoothState()
						
						// 显示提示
						uni.showToast({
							title: event.message,
							icon: event.type === 'connected' ? 'success' : 'none'
						})
					},
					
					// 数据接收回调
					onDataReceived: (data) => {
						console.log('接收到数据:', data)
						
						// 记录接收的数据
						this.receivedData.unshift({
							time: this.getCurrentTime(),
							data: `接收: ${data.hexString}`,
							type: 'receive'
						})
						
						// 解析设备数据
						this.parseReceivedData(data.hexString)
						
						// 限制历史记录数量
						if (this.receivedData.length > 50) {
							this.receivedData = this.receivedData.slice(0, 50)
						}
					},
					
					// 错误回调
					onError: (error) => {
						console.error('蓝牙错误:', error)
						uni.showToast({
							title: error.message,
							icon: 'none',
							duration: 3000
						})
					}
				})
			},
			
			/**
			 * 更新蓝牙状态
			 */
			updateBluetoothState() {
				this.bluetoothState = bluetoothAPI.getConnectionState()
			},
			
			/**
			 * 初始化蓝牙
			 */
			async initBluetooth() {
				try {
					await bluetoothAPI.initBluetooth()
					this.updateBluetoothState()
				} catch (error) {
					console.error('蓝牙初始化失败:', error)
				}
			},
			
			/**
			 * 扫描设备
			 */
			async scanDevices() {
				try {
					await bluetoothAPI.scanDevices(10000) // 扫描10秒
					this.updateBluetoothState()
				} catch (error) {
					console.error('扫描设备失败:', error)
				}
			},
			
			/**
			 * 连接设备
			 */
			async connectDevice(device) {
				try {
					uni.showLoading({ title: '连接中...' })
					await bluetoothAPI.connectDevice(device)
					this.updateBluetoothState()
					uni.hideLoading()
				} catch (error) {
					uni.hideLoading()
					console.error('连接设备失败:', error)
				}
			},
			
			/**
			 * 断开设备
			 */
			async disconnectDevice() {
				try {
					await bluetoothAPI.disconnectDevice()
					this.updateBluetoothState()
				} catch (error) {
					console.error('断开连接失败:', error)
				}
			},
			
			/**
			 * 发送数据
			 */
			async writeData() {
				if (!this.sendData) {
					uni.showToast({
						title: '请输入要发送的数据',
						icon: 'none'
					})
					return
				}
				
				try {
					await bluetoothAPI.writeData(this.sendData)
					
					// 记录发送的数据
					this.receivedData.unshift({
						time: this.getCurrentTime(),
						data: `发送: ${this.sendData}`,
						type: 'send'
					})
					
					this.sendData = '' // 清空输入框
					
					uni.showToast({
						title: '发送成功',
						icon: 'success'
					})
				} catch (error) {
					console.error('发送数据失败:', error)
				}
			},
			
			/**
			 * 解析接收到的数据
			 * 根据您的设备通信协议解析数据
			 */
			parseReceivedData(hexString) {
				try {
					// 示例：假设设备发送的是心率数据
					// 实际实现需要根据你的设备协议来解析
					if (hexString.length >= 4) {
						const heartRateHex = hexString.substring(0, 4)
						const heartRate = parseInt(heartRateHex, 16)
						
						if (heartRate > 40 && heartRate < 200) {
							this.heartRate = heartRate
							this.currentHeartRate = heartRate
						}
					}
				} catch (error) {
					console.error('数据解析错误', error)
				}
			},
			
			/**
			 * 获取当前时间字符串
			 */
			getCurrentTime() {
				const now = new Date()
				return `${now.getHours().toString().padStart(2, '0')}:${now.getMinutes().toString().padStart(2, '0')}:${now.getSeconds().toString().padStart(2, '0')}`
			}
		}
	}
</script>

<style>
	.container {
		background-color: #f5f5f5;
		padding: 12px;
	}
	
	/* #ifdef WEB */
	.web-container {
		background-color: #f5f5f5;
		padding: 20px;
		min-height: 100vh;
		max-width: 1200px;
		margin: 0 auto;
		overflow-y: auto;
	}
	/* #endif */

	.card {
		background-color: #ffffff;
		border-radius: 12px;
		padding: 16px;
		margin-bottom: 12px;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	}

	/* 蓝牙连接模块样式 */
	.bluetooth-card {
		margin-bottom: 16px;
	}

	.bluetooth-status {
		display: flex;
		flex-direction: row;
		align-items: center;
	}

	.bluetooth-status.connected .status-dot {
		background-color: #00d4aa;
	}

	.bluetooth-status.scanning .status-dot {
		background-color: #ff9500;
		animation: pulse 1s infinite;
	}

	.bluetooth-status.initialized .status-dot {
		background-color: #007AFF;
	}

	.bluetooth-status.disconnected .status-dot {
		background-color: #ff3b30;
	}

	.bluetooth-controls {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		margin-bottom: 16px;
	}

	.bt-button {
		flex: 1;
		min-width: 100px;
		height: 40px;
		margin: 4px;
		border-radius: 8px;
		border: none;
		background-color: #007AFF;
		color: #ffffff;
		font-size: 14px;
	}

	.bt-button:disabled {
		background-color: #cccccc;
		color: #999999;
	}

	.bt-button.danger {
		background-color: #ff3b30;
	}

	.device-list {
		margin-bottom: 16px;
	}

	.device-item {
		display: flex;
		flex-direction: row;
		align-items: center;
		padding: 12px;
		margin-bottom: 8px;
		background-color: #f8f9fa;
		border-radius: 8px;
		border: 1px solid #e9ecef;
	}

	.device-info {
		flex: 1;
		display: flex;
		flex-direction: column;
	}

	.device-name {
		font-size: 16px;
		font-weight: 600;
		color: #333333;
		margin-bottom: 4px;
	}

	.device-id {
		font-size: 12px;
		color: #666666;
		margin-bottom: 2px;
	}

	.device-rssi {
		font-size: 11px;
		color: #999999;
	}

	.connect-btn {
		padding: 6px 12px;
		background-color: #007AFF;
		color: #ffffff;
		border-radius: 6px;
		font-size: 12px;
	}

	.connected-btn {
		padding: 6px 12px;
		background-color: #00d4aa;
		color: #ffffff;
		border-radius: 6px;
		font-size: 12px;
	}

	.connection-details {
		margin-bottom: 16px;
	}

	.detail-row {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		padding: 8px 0;
		border-bottom: 1px solid #f0f0f0;
	}

	.detail-row:last-child {
		border-bottom: none;
	}

	.detail-label {
		font-size: 14px;
		color: #666666;
	}

	.detail-value {
		font-size: 14px;
		color: #333333;
		flex: 1;
		text-align: right;
		margin-left: 16px;
		word-break: break-all;
	}

	.data-section {
		margin-top: 16px;
	}

	.data-controls {
		display: flex;
		flex-direction: row;
		margin-bottom: 12px;
	}

	.data-input {
		flex: 1;
		height: 40px;
		padding: 0 12px;
		border: 1px solid #e9ecef;
		border-radius: 8px;
		margin-right: 8px;
		font-size: 14px;
	}

	.send-button {
		width: 60px;
		height: 40px;
		background-color: #007AFF;
		color: #ffffff;
		border: none;
		border-radius: 8px;
		font-size: 14px;
	}

	.received-data {
		margin-top: 12px;
	}

	.data-label {
		font-size: 14px;
		font-weight: 600;
		color: #333333;
		margin-bottom: 8px;
	}

	.data-display {
		height: 120px;
		border: 1px solid #e9ecef;
		border-radius: 8px;
		padding: 8px;
		background-color: #f8f9fa;
	}

	.data-item {
		display: flex;
		flex-direction: column;
		margin-bottom: 8px;
		padding: 6px;
		background-color: #ffffff;
		border-radius: 4px;
	}

	.data-time {
		font-size: 10px;
		color: #999999;
		margin-bottom: 2px;
	}

	.data-content {
		font-size: 12px;
		color: #333333;
		font-family: monospace;
	}

	/* 状态栏 */
	.status-bar {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		padding: 12px 16px;
		background-color: #ffffff;
		border-radius: 12px;
		margin-bottom: 12px;
	}

	.status-indicator {
		display: flex;
		flex-direction: row;
		align-items: center;
	}

	.status-dot {
		width: 8px;
		height: 8px;
		border-radius: 4px;
		background-color: #00d4aa;
		margin-right: 8px;
	}

	.status-text {
		font-size: 14px;
		font-weight: 500;
		color: #333333;
	}

	.connection-info {
		font-size: 12px;
		color: #666666;
	}

	/* 心电图卡片 */
	.ecg-card {
		margin-bottom: 16px;
		min-height: 200px;
	}

	.card-header {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 16px;
	}

	.card-icon {
		font-size: 16px;
		margin-right: 8px;
	}

	.card-title {
		font-size: 16px;
		font-weight: 600;
		color: #333333;
		flex: 1;
	}

	.recording-indicator {
		display: flex;
		flex-direction: row;
		align-items: center;
	}

	.recording-dot {
		width: 6px;
		height: 6px;
		border-radius: 3px;
		background-color: #ff4444;
		margin-right: 6px;
		animation: pulse 1.5s infinite;
	}

	.recording-text {
		font-size: 12px;
		color: #ff4444;
	}

	/* 心电图显示区域 */
	.ecg-display {
		display: flex;
		flex-direction: column;
	}

	.ecg-waveform {
		height: 120px;
		position: relative;
		background-color: #000000;
		border-radius: 8px;
		overflow: hidden;
		margin-bottom: 16px;
	}

	.waveform-grid {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}

	.grid-line {
		height: 1px;
		background-color: #00ff00;
		opacity: 0.3;
	}

	.waveform-line {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
	}

	.wave-point {
		position: absolute;
		width: 2px;
		height: 2px;
		background-color: #00ff00;
		border-radius: 1px;
	}

	.heart-rate-display {
		display: flex;
		flex-direction: row;
		align-items: baseline;
		justify-content: center;
	}

	.heart-rate-value {
		font-size: 32px;
		font-weight: 700;
		color: #ff4444;
	}

	.heart-rate-unit {
		font-size: 16px;
		color: #666666;
		margin-left: 4px;
	}

	/* 指标网格 */
	.metrics-grid {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		margin-bottom: 16px;
	}

	.metric-card {
		flex: 1;
		min-width: 120px;
		background-color: #ffffff;
		border-radius: 12px;
		padding: 16px;
		margin: 6px;
		display: flex;
		flex-direction: column;
		align-items: center;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	}

	.metric-icon {
		font-size: 20px;
		margin-bottom: 8px;
	}

	.metric-label {
		font-size: 12px;
		color: #666666;
		margin-bottom: 4px;
	}

	.metric-value {
		font-size: 18px;
		font-weight: 600;
		color: #333333;
		margin-bottom: 2px;
	}

	.metric-unit {
		font-size: 10px;
		color: #999999;
	}

	/* 控制面板 */
	.control-panel {
		display: flex;
		flex-direction: row;
		margin-bottom: 16px;
	}

	.control-button {
		flex: 1;
		height: 48px;
		border-radius: 12px;
		display: flex;
		align-items: center;
		justify-content: center;
		margin: 0 6px;
	}

	.control-button.primary {
		background-color: #007AFF;
	}

	.control-button.secondary {
		background-color: #f0f0f0;
	}

	.button-text {
		font-size: 16px;
		font-weight: 500;
	}

	.control-button.primary .button-text {
		color: #ffffff;
	}

	.control-button.secondary .button-text {
		color: #333333;
	}

	/* 快捷操作 */
	.quick-actions {
		background-color: #ffffff;
		border-radius: 12px;
		padding: 16px;
	}

	.section-title {
		font-size: 16px;
		font-weight: 600;
		color: #333333;
		margin-bottom: 12px;
	}

	.action-list {
		display: flex;
		flex-direction: column;
	}

	.action-item {
		display: flex;
		flex-direction: row;
		align-items: center;
		padding: 12px 0;
		border-bottom: 1px solid #f0f0f0;
	}

	.action-item:last-child {
		border-bottom: none;
	}

	.action-icon {
		font-size: 16px;
		margin-right: 12px;
	}

	.action-text {
		font-size: 14px;
		color: #333333;
		flex: 1;
	}

	.action-arrow {
		font-size: 14px;
		color: #999999;
	}

	/* 动画效果 */
	@keyframes pulse {
		0% { opacity: 1; }
		50% { opacity: 0.5; }
		100% { opacity: 1; }
	}

	/* Web平台适配 */
	/* #ifdef WEB */
	.control-button {
		cursor: pointer;
		transition: all 0.3s ease;
	}

	.control-button:hover {
		transform: translateY(-2px);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	}

	.action-item {
		cursor: pointer;
		transition: background-color 0.2s ease;
	}

	.action-item:hover {
		background-color: #f8f9fa;
	}

	.device-item {
		cursor: pointer;
		transition: background-color 0.2s ease;
	}

	.device-item:hover {
		background-color: #e9ecef;
	}
	/* #endif */

	/* Android状态栏适配 */
	/* #ifdef APP-ANDROID */
	.container {
		padding-top: 25px;
	}
	/* #endif */
</style> 